package defpackage; import java.io.File; import java.io.FileInputStream; import java.io.IOException; /* renamed from: unl reason: default package */ public final class unl { /* JADX WARNING: Removed duplicated region for block: B:28:0x0086 */ /* JADX WARNING: Removed duplicated region for block: B:33:0x008e */ static void a(avo avo, zig zig, ark ark) { File file; File file2; clr clr; Throwable th; FileInputStream fileInputStream = null; if (ark != null) { try { file2 = tiq.fjX(); try { String absolutePath = file2.getAbsolutePath(); if (zig != null) { try { clr = new clr(absolutePath); try { clt a = clr.ckw.a(cle.cjF, -1); if (a == null) { clr.close(); } else { cls apL = a.apL(); clt a2 = apL.apK().a(cle.ciO, 0); col col = new col(apL.getOutputStream()); col.startDocument(); col.N("xdr", "anchor"); col.M("xdr", "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"); col.O("xdr", "anchor"); col.endDocument(); new zjo(a2.apL().getOutputStream(), zig).np(); clr.close(); } } catch (Throwable th2) { th = th2; if (clr != null) { clr.close(); } throw th; } } catch (Throwable th3) { th = th3; clr = null; if (clr != null) { } throw th; } } if (!file2.exists()) { lul.closeQuietly(null); if (file2 != null) { file2.delete(); return; } return; } byte[] bArr = new byte[((int) file2.length())]; FileInputStream fileInputStream2 = new FileInputStream(file2); try { fileInputStream2.read(bArr); avo.a(new avf(937, true, bArr)); lul.closeQuietly(fileInputStream2); if (file2 != null) { file2.delete(); } } catch (IOException e) { e = e; fileInputStream = fileInputStream2; file = file2; try { throw new RuntimeException(e); } catch (Throwable th4) { th = th4; file2 = file; lul.closeQuietly(fileInputStream); if (file2 != null) { } throw th; } } catch (Throwable th5) { th = th5; fileInputStream = fileInputStream2; lul.closeQuietly(fileInputStream); if (file2 != null) { } throw th; } } catch (IOException e2) { e = e2; file = file2; throw new RuntimeException(e); } catch (Throwable th6) { th = th6; lul.closeQuietly(fileInputStream); if (file2 != null) { } throw th; } } catch (IOException e3) { e = e3; file = null; throw new RuntimeException(e); } catch (Throwable th7) { th = th7; file2 = null; lul.closeQuietly(fileInputStream); if (file2 != null) { file2.delete(); } throw th; } } } }